#include <stdio.h>
#include <fstream>

main ()  // read file from stdin
{
  char ch;
  int    bytes;
  bytes = 0;
  while (1)
  {
    ch = fgetc (stdin);
    if (feof(stdin))
      break;
    fprintf (stdout, " %d> %2.2x %c\n", bytes, ch, ch < 0x80 && ch >= ' ' ? ch : ' ');
    ++bytes;
  }
}

